package com.guangyunl.h_param;
// 基本类型做方法参数传递，传递的是值，不是变量本身
// 方法运行：压栈
// 方法运行完毕：弹栈 -> 释放栈内存
public class Demo01Param {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        method(a, b);
        System.out.println("========================");
        System.out.println("a = " + a); // 10
        System.out.println("b = " + b); // 20
    }
    public static void method(int a, int b){
        a += 10;
        b += 20;
        System.out.println("a = " + a); // 20
        System.out.println("b = " + b); // 40
    }
}
/*
a = 20
b = 40
========================
a = 10
b = 20
 */